<template>
  <div>
    <el-form class="input-form"
             label-position="right"
             label-width="120px"
             ref="editForm"
             :rules="propRules"
             :model="form"
    >
      <el-row :gutter="20">
        <el-col :span="6">
          <el-form-item label="来源业务" prop="busType">
            <el-input v-model="form.busType"/>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="日志类型" prop="logType">
            <el-input v-model="form.logType"/>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="业务单号" prop="busKey">
            <el-input v-model="form.busKey"/>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="业务主键" prop="busType">
            <el-input v-model="form.busId"/>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :span="8">
          <el-form-item label="创建时间" prop="gmtCreate">
            <el-input v-model="form.gmtCreate"/>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="创建人" prop="creatorName">
            <el-input v-model="form.creatorName"/>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="操作IP" prop="ip">
            <el-input v-model="form.ip"/>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :span="24">
          <el-form-item label="传入参数" prop="param">
            <el-input v-model="form.param" size="medium" type="textarea" :autosize="{ minRows: 1, maxRows: 20}"  style="white-space: pre; max-height: 400px ; overflow: auto"/>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :span="24">
          <el-form-item label="日志描述" prop="msg">
            <el-input v-model="form.msg" size="medium" type="textarea" :autosize="{ minRows: 1, maxRows: 100}"  style="white-space: pre; max-height: 600px ; overflow: auto"/>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
  </div>
</template>

<script>
/*eslint-disable*/
export default {
  data() {
    return {
      form: {},
      viewData: {}
    }
  },
  methods: {
  },
  created() {
    this.$emit('event-register', {
      validate: (callback) => {
        this.$refs.editForm.validate(callback)
      },
      beforeSave: () => {
        this.$emit('data-callback', this.form)
        return true
      },
      afterMove: (formData, initData) => {
        this.form = global.utils.jsonClone(formData)

        // 设置switch 元素默认值
      },
      afterSave: () => {  },
      beforeDelete: () => {
        return true
      },
      afterDelete: () => {
      },
      beforeFlow: (flowButtonKey) => {
        return true
      },
      afterFlow: (flowButtonKey) => {
      },
      beforeClose: () => {
        return true
      }
    })
  },
  props: {
    propParent: Object,
    propInitData: Object,
    propPrimaryKey: String,
    propDictionaries: Object,
    propCurrentRow: Object,
    propViewFormData: Object,
    propReadonly: Boolean,
    propStatus: String,
    propRules: Object
  },
  components: {
  },
  computed: {
  }
}
</script>

<style lang="scss" scoped>
  .container {
    width: 100%;
    height: 100%;
  }
</style>
